1. Field of the Invention
The present invention relates to an apparatus for calculating the time required for machining using an NC (Numeric Control) machine tool, and in particular to an apparatus for calculating an axis moving time when the numeric control apparatus itself has an algorithm for adjusting the feeding velocity or the like for achieving an optimum machining process.
2. Description of the Related Art
When a production schedule or the like is made, a schedule is established based on the required time for each production process and in consideration of operation state of the production equipment and load of an operator so that the schedule is effective and waste in resources is minimized. The required time for each production process is estimated by collecting past performance and from experience.
The required time for a machining step using the NC machine tool depends to a great extent on a part program. In a part program generated by a CAM (Computer Aided Manufacturing system), the CAM has a unit for calculating the machining time, and, typically, the machining time is output along with the part program. In addition, an apparatus is known in which a machining time estimating unit is provided in a numeric control apparatus which drives and controls an NC machine tool and in which the machining time is calculated based on the input part program. The apparatus for calculating machining time in these apparatuses calculates an axis moving time by dividing an axis moving distance, which is a relative movement distance between the tool and the part, by an axis feeding velocity.
FIG. 3 exemplifies a numeric control apparatus in which a unit for calculating a machining time is provided. The numeric control apparatus comprises an actual machining time calculating unit 121 which calculates an actual machining time of a driving mechanism 102 related to an auxiliary function which is a function other than the axis moving function and updates data stored in a database 122 using the calculated actual machining time. An NC program stored in a program storing unit 111 is analyzed block by block and an estimated axis moving time is calculated based on the analysis result. The numeric control apparatus also searches through the database 122 to obtain an actual machining time of a corresponding auxiliary function. A machining time estimating unit 124 is provided for calculating a machining time for each block based on the obtained estimated axis moving time and the actual machining time of auxiliary function and calculating an estimated machining time by adding these. In this structure, the estimated axis moving time is calculated based on an axis moving distance and an axis feeding velocity which are determined from an axis moving instruction, in consideration of an acceleration/deceleration rate of the axis movement stored in a parameter storing unit 114.
The actual machining time calculating unit 121 of the numeric control apparatus calculates an actual machining time of axis movement based on a control signal output from a program analysis unit 112 and an operation completion signal from the driving mechanism 102. It is also possible to calculate the machining time for each block based on the obtained actual machining time of the axis movement and the obtained actual machining time of the auxiliary function and then, adding the machining times to calculate an actual machining time (refer to, for example, Japanese Patent Laid-Open Publication No. 2003-175439).
A structure of a numeric control apparatus which drives and controls a typical NC machine tool will be described referring to FIG. 4 focusing on the axis movement operation.
A part program 1 instructs a machine operation in units of blocks and comprises an axis moving instruction for relatively moving the tool and the part and an auxiliary function instruction for functions other than the axis movement such as a rotation instruction of the spindle and a tool exchange instruction. An NC parameter storing unit 4 stores NC parameters which are necessary information of the machines, for the numeric control apparatus to drive and control the NC machine tool based on the part program, such as, for example, a value of a work coordinate origin with respect to a machine coordinate origin, a tool length and a tool radius for tool offset, and a maximum feed velocity and allowed acceleration of a machine. The maximum feed velocity and allowed acceleration of a machine are set in advance by the machine tool maker and the value such as the work coordinate origin, tool length, and tool radius are set to suitable values by an operator of the machine using an NC parameter setting unit 3 before the program is run.
A program interpreting unit 12 reads the part program 1, sequentially interprets instructions block by block, and generates machining data for each block. The generated machining data is stored in an execution data buffer 15. In this process, the NC parameters stored in the NC parameter storing unit 4 are referred as necessary.
An interpolation unit 16 has functions as follows. First, the interpolation unit 16 sequentially reads part data stored in the execution data buffer 15 in units of blocks and determines whether or not the read part data is an axis moving instruction. When the read part data is an axis moving instruction, the interpolation unit 16 sequentially determines the position of a tool on the part with respect to the shape instructed corresponding to the block. In other words, the interpolation unit 16 sequentially interpolates a relative movement path of the tool with respect to the part so that the tool moves on the part at the instructed feeding velocity to determine interpolation points as the position of the tool on the part. The timing for determining the interpolation points is synchronized with a synchronization signal which is output in a predetermined period (interpolation cycle, hereinafter referred to as “control period”) from a synchronization unit 19. The control period required during determination of the interpolation points refers to the NC parameter stored in the NC parameter storing unit 4. In addition, the interpolation unit 16 determines a difference between the determined interpolation point and an interpolation point determined at a previous control period and outputs the difference to a servo control unit 17 as an incremental movement instruction. The servo control unit 17 applies a servo control to a motor 18 based on the incremental movement instruction in synchronization with the synchronization signal output from the synchronization unit 19 at every control period to drive a feeding axis of the machine tool (not shown) according to the axis moving instruction.
Various interpolation algorithms for interpolating, in each control period, the movement path instructed by the axis moving instruction are available depending on the target NC machine tool and numeric control apparatus. Therefore, the axis moving times also significantly differ from each other depending on the interpolation algorithm.
For example, a case is considered in which a sector-shaped part as shown in FIG. 5A is machined with a part program shown in FIG. 5B and a movement path of Pa→Pb→Pc→Pa.
A basic interpolation algorithm is a method in which the tool is accelerated with a set acceleration time constant from a movement starting point for each block to a designated feed velocity, the tool is moved at a constant feed velocity, and the tool is decelerated at a set deceleration time constant from a point before a movement completion point. FIG. 6 shows a feed velocity when a sector-shaped part of FIG. 5A is to be machined by a numeric control apparatus having such an interpolation algorithm. The axis moving time of the numeric control apparatus using such an algorithm can be determined from an axis moving distance, an axis feeding velocity, and the acceleration/deceleration time constant for each block. Therefore, when the basic interpolation algorithm is employed, it is possible to accurately calculate the axis moving time even with the machining time calculating apparatus of the related art.
However, advanced numeric control apparatuses which are recently developed often have a function for optimally adjusting the feeding velocity and the acceleration/deceleration in order to improve the machining precision and quality. FIG. 7 shows an example feed velocity when the sector-shaped part of FIG. 5A is to be machined by a numeric control apparatus having an interpolation algorithm corresponding to such a configuration. In the interpolation algorithm in this numeric control apparatus, when the relative movement direction of the tool and the part changes, the feeding velocity is optimally adjusted according to the amount of change. In the illustrated example structure, the feeding velocity is reduced to an optimal feeding velocity v1 compared to the case when the basic interpolation algorithm is used at the machining points Pb and Pc wherein the movement direction is drastically changed as shown in FIG. 5A, according to an mount of change in the feeding velocity and movement direction before and after the point of the drastic change. In addition, because the movement direction continuously changes at the arc section, the feeding velocity is reduced compared to the case in which the basic interpolation algorithm is used based on the radius of curvature.
In a machining time calculating apparatus of the related art which estimates the axis moving time using the basic interpolation algorithm solely from the axis moving distance, axis feeding velocity, and acceleration/deceleration time constants, the axis moving time cannot be accurately calculated in the above-described configuration. That is, it is not possible to accurately calculate the axis moving time in a machining process by a numeric control apparatus having the interpolation algorithm to automatically adjust the feeding velocity and acceleration/deceleration. For example, in a machining operation, such as the machining of a mold in which the axis moving time occupies a large proportion of the time compared to the time when the auxiliary function is executed, a large difference between an estimated machining time and the actual machining time will result from an error in calculating the axis moving time, creating a significant problem in production scheduling or order fulfillment. Thus, there had been a problem in that the obtained estimate cannot be used for production scheduling without further processing.
In such a configuration, an operator corrects the calculated machining time from his experience and uses the corrected machining time. However, in the numeric control apparatus, the feeding velocity and the acceleration/deceleration are often continuously optimally adjusted based on various factors such as a shape instructed by the part program, a degree of approximation of the shape, an upper limit of feeding velocity with respect to the axis movement, and allowed acceleration of the axis movement. The axis moving time may significantly vary even when one factor is slightly changed, and, thus, it has been difficult to use the experience and to accurately correct the calculated machining time.
There is another method of using an actual machining time of the axis movement determined as a function of the actual machining time outputting unit in the related art. However, in this method, it is necessary to actually operate the NC machine tool using the target part program, and thus, in a machining process such as a mold machining which requires few hours to few tens of hours, this time is required for estimating the machining time. Moreover, because the NC machine tool cannot be used during this period for other purposes, such as the actual machining and preparation of machining, this method is impractical. In addition, this method requires that an actual machining time calculating unit be directly connected to the NC machine tool, and, therefore, this method is not suited for a system in which a required time for each production process is calculated and a production schedule is established based on the calculated time.